package cn.cloud9.designpattern.dp07decorator.decorator;

import java.math.BigDecimal;

/**
 * @projectName: Java
 * @author: 戴知舟
 * @date: 2022年05月24日 11:08
 * @version: 1.0
 */
public class FriedEggDecorator extends PancakeDecorator {

    public FriedEggDecorator(Pancake pancake) {
        super(pancake);
    }

    @Override
    protected String getMsg() {
        return super.getMsg() + " 附加煎蛋";
    }

    @Override
    protected BigDecimal getPrice() {
        return super.getPrice().add(new BigDecimal(1D));
    }
}
